home *** CD-ROM | disk | FTP | other *** search
- Path: ccnews.ncku.edu.tw!news
- From: next@eembox.ncku.edu.tw ()
- Newsgroups: comp.lang.c++
- Subject: Help: In MFC, how to enable Automation in thread ??
- Date: Wed, 03 Apr 1996 12:55:42 GMT
- Organization: 3D MIRACLE Lab
- Message-ID: <4jtsf5$kro@ccnews.ncku.edu.tw>
- NNTP-Posting-Host: 140.116.72.115
- X-Newsreader: Forte Free Agent v0.55
-
-
- Here are som facts in MFC:
-
- (1). To enable OLE automation, create a CCmdTarget-derived class, then
- EnableAutomation() in constructor.
-
- (2). To wrap a automation server, use ClassWizard to create a
- COleDispatchDriver-deriver class.
-
- (3). To create a new thread (worker or user-interface), use
- AfxBeginThread().
-
- Now, I use AfxBeginThread() to create a thread X, in this thread I use
- a COleDispatchDriver-derived class Y to invoke automation calls (i.e.,
- thread X is an automation client). But this doesn't work!!
-
- This COleDispatchDriver-derived class Y works well in document class.
-
- What's wrong with the thread X?? How to create a automation-enabled
- thread using AfxBeginThread()??
-
- Please help me! Any suggestion will be very appreciated, thanx.
-
-
- =================================
- Wang, Hong-Ming
- Mirac Lab.
- next@eembox.ncku.edu.tw
- =================================
-
-